﻿@using KMF.Common
@using KMF.WebUI.Areas.KMFadmin.Models
@using KMF.WebUI.Areas.KMFadmin.CustomHelpers
@model WebInfoDto
@{
    ViewBag.Title = "Thông tin website";
    Layout = "~/Areas/KMFadmin/Views/Shared/_layout.cshtml";
}
@section LeftMenu
{
    <div id="left">
        <div class="LeftMenuWraper">
            <div class="leftMenuHeader">
                <span style="padding-left: 10px;">
                    <strong>Truy cập nhanh</strong>
                </span>
            </div>
            <ul id="p-quick-menu" class="quick-menu">
                <li class="qmn-info-pro">
                    <a href="@Url.Action("Index","AdminWebInfo")">Thông tin website</a>
                </li>
                <li class="qmn-info-pro">
                    <a href="@Url.Action("Index","AdminConfig")">Thông tin tĩnh</a>
                </li>
                <li class="qmn-info-pro"><a href="@Url.Action("Index","AdminConfigSystem")">Cấu hình hệ thống</a></li>
                <li class="qmn-info-pro"><a href="@Url.Action("ConfigFilter", "AdminProductFilter")">Cấu hình bộ lọc</a></li>
            </ul>
            <div class="leftMenuFooter"></div>
        </div>
    </div>
    <!-- END #left -->
}
<nav>
    <div id="jCrumbs" class="breadCrumb module">
        <ul>
            <li><a href="@Url.Action("Index", "AdminHome")"><i class="bootstrap icon-home"></i></a></li>
            <li><a href="javascript:void(0)">Hệ Thống</a> </li>
            <li><a href="@Url.Action("Index", "ADminNews")">Thông tin website</a> </li>
        </ul>
    </div>
</nav>
<div class="toolBox">
    @Html.ToolBox(new List<object> { new Save() { ClassCss = "Save", ActionName = "Javascript:void(0)" } })
</div>

<div class="box-Info">
    <div class="Info-header">
        <span>Cập nhập thông tin website</span>
    </div>
    <div class="Info-body">
        @using (Html.BeginForm("Index", "AdminWebInfo", FormMethod.Post, new { @class = "formEditNews", enctype = "multipart/form-data" }))
        {
            <table cellpadding="0" cellspacing="0" width="100%" border="0" class="table-info">
                <tr>
                    <td class="tInfoLeft">
                        Meta title
                    </td>
                    <td class="tInfoRight">
                        @Html.TextBoxFor(m => m.WebTitle, new { @onkeyup = "countTextAreaChar(this, 70,'countNewsMetaTitle')" })
                        @Html.ValidationMessageFor(m => m.WebTitle)<br />
                        <input readonly="readonly" class="cssInputHidden" type="text" name="countNewsMetaTitle" size="3" maxlength="3" style="width: 53px; height: 23px; margin: 0px; padding: 0px 0px 0px 10px;" value="0">
                        ký tự. Hầu hết các công cụ tìm kiếm sử dụng tối đa <span style="color: red;">70</span> ký tự cho tiêu đề
                    </td>
                </tr>

                <tr>
                    <td class="tInfoLeft">
                        Meta description
                    </td>
                    <td class="tInfoRight">
                        @Html.TextAreaFor(m => m.MetaDescription, new { @class = "texareaCss", @onkeyup = "countTextAreaChar(this, 160,'countNewsMetaDesc')" })
                        <br />
                        <input readonly="readonly" class="cssInputHidden" type="text" name="countNewsMetaDesc" size="3" maxlength="3" style="width: 53px; height: 23px; margin: 0px; padding: 0px 0px 0px 10px;" value="0">
                        ký tự. Hầu hết các công cụ tìm kiếm sử dụng tối đa <span style="color: red;">160</span> ký tự cho các mô tả
                    </td>
                </tr>
                <tr>
                    <td class="tInfoLeft">
                        Meta keyword
                    </td>
                    <td class="tInfoRight">
                        @Html.TextAreaFor(m => m.MetaKeyword, new { @class = "texareaCss" })
                    </td>
                </tr>
                <tr>
                    <td class="tInfoLeft">
                        Ảnh logo
                    </td>
                    <td class="tInfoRight">
                        <input type="file" name="imageFile" />
                        @Html.HiddenFor(m => m.LogoPath)
                    </td>
                </tr>
                <tr>
                    <td class="tInfoLeft">
                        Liên kết logo
                    </td>
                    <td class="tInfoRight">
                        @Html.TextBoxFor(m => m.LogoLink)
                        @Html.HiddenFor(m => m.CreateDate)
                        @Html.HiddenFor(m => m.LogoPath)
                    </td>
                </tr>
                <tr>
                    <td class="tInfoLeft">
                        Intro
                    </td>
                    <td class="tInfoRight">
                        <textarea class="ckIntro" rows="50" cols="60" id="editor1" name="Intro">@Model.Intro</textarea>
                    </td>
                </tr>
                <tr>
                    <td class="tInfoLeft">
                        Thông tin liên hệ
                    </td>
                    <td class="tInfoRight">
                        <textarea class="ckContact" rows="50" cols="60" id="editor2" name="ContactInfo">@Model.ContactInfo</textarea>
                    </td>
                </tr>
                <tr>
                    <td class="tInfoLeft">
                        Text Footer
                    </td>
                    <td class="tInfoRight">
                        <textarea class="ckTextFooter" rows="50" cols="60" id="editor3" name="CategoryFooter">@Model.CategoryFooter</textarea>
                    </td>
                </tr>
                <tr>
                    <td class="tInfoLeft">
                        Add Footer
                    </td>
                    <td class="tInfoRight">
                        <textarea class="ckAddFooter" rows="50" cols="60" id="editor4" name="FooterAddress">@Model.FooterAddress</textarea>
                    </td>
                </tr>

            </table>
        }
    </div>
</div>

@section scripts
{
    @Scripts.Render("~/bundles/KMFAdmin/jqueryval")
    <script src="@Url.Content("~/Areas/KMFadmin/Scripts/WYSIWYG/ckeditor/ckeditor.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Areas/KMFadmin/Scripts/WYSIWYG/ckfinder/ckfinder.js")" type="text/javascript"></script>
    <script type="text/javascript">
        var editor = CKEDITOR.replace('editor1');
        var editor2 = CKEDITOR.replace('editor2');
        var editor3 = CKEDITOR.replace('editor3');
        var editor4 = CKEDITOR.replace('editor4');
        CKFinder.setupCKEditor(editor, '/Areas/KMFadmin/Scripts/WYSIWYG/ckfinder/');
        CKFinder.setupCKEditor(editor2, '/Areas/KMFadmin/Scripts/WYSIWYG/ckfinder/');
        CKFinder.setupCKEditor(editor3, '/Areas/KMFadmin/Scripts/WYSIWYG/ckfinder/');
        CKFinder.setupCKEditor(editor4, '/Areas/KMFadmin/Scripts/WYSIWYG/ckfinder/');
    </script>
    <script>
        SubmitFormUseToolBox($('ul li.Save a'), $('form'));
    </script>
}
